Skip to main content

mobileEnableAccelerometer

Type

command

Summary

Enables the accelerometer so that accelerationChanged events are delivered.

Syntax

mobileEnableAccelerometer [<interval>]

Description

The mobileEnableAccelerometer command enables the accelerometer on the device.

The mobileEnableAccelerometer command will cause accelerationChanged events to be delivered to the current card of the defaultStack at the specified interval.

note

The interval is constrained by hardware-specific minimums and maximums (which are left unspecified by Apple).

Parameters

NameTypeDescription

interval

Specified in seconds and is the approximate time between delivery of messages.

Examples

mobileEnableAccelerometer 100

property: defaultStack

command: mobileDisableAccelerometer

message: accelerationChanged

Compatibility and Support

Introduced

LiveCode 4.5.2

OS

ios

android

Platforms

mobile

Thank you for your feedback!

Was this page helpful?